package designPattern.Decorator;

/**
 * 装饰器模式
 */
public class Test {
    public static void main(String[] args) {

        Drink drink = new Dounai();
        BlackdouDecorator blacktang = new BlackdouDecorator(drink);
        SugarDecroator  sugar = new SugarDecroator(blacktang);
        PearlDecorator pearl = new PearlDecorator(sugar);

        System.out.println("这杯豆浆价格为："+pearl.cost());
        System.out.println("描述为："+pearl.desc());
    }
}